<div th:fragment="page" style="display: flex; flex-direction: row">
  <style>
    .page{
      border: 1px solid blue;
      margin-right: 5px;
      padding: 3px 5px;
    }
    .page.active{
      color: red;
      border: 1px solid red;
    }
  </style>

  <div style="float: left">
    当前第<span th:text="${page.current}"></span>页
    总记录数<span th:text="${page.total}"></span>
  </div>
  <div>
    <a href="?current=1">[首  页]</a>
    <a th:if="${page.current-1}>0" th:href="@{${#httpServletRequest.servletPath}(current=${page.current-1})}" >[上一页]</a>
    <a th:if="${page.current+1}<=${page.pages}" th:href="@{${#httpServletRequest.servletPath}(current=${page.current+1})}">[下一页]</a>
    <a th:href="@{${#httpServletRequest.servletPath}(current=${page.pages})}">[末  页]</a>
  </div>
</div>
